<?php
/***************************************************************************
                                Interface1.php
                             --------------------
  
        A PHP5 class used as a reference to test interface parsing. 

 **************************************************************************/

// Dummy declaration to check correct PHP4/PHP5 parsing
interface Interface2 { }

/**
 * API constants group.
 *
 * Defining API constants at the interface level is a good idea.
 */
define("API_CONST_ONE", 1);    // case constant ONE
define("API_CONST_TWO", 2);    // case constant TWO
define("API_CONST_THREE", 3);  // case constant THREE

/**
 * A class for interface parsing tests.
 *
 * Only the "public" scope is authorized in interface.
 *
 * No code is declared to force the extending class defining
 * this method.
 *
 * @author    JM Faure <jmfaure@users.sourceforge.net>
 * @version   1.0
 * @date      09 Aug 2005
 */
interface Interface1 extends Interface2 {

/**
 * A method with 3 parameters.
 *
 * Access type for interface this method is omitted because 
 * public is the default access type (but it isn't a nice
 * practice. 
 *
 * @param (string) $p1 the first parameter
 * @param (int) $p2 the second parameter
 * @param (bool) $p3 the 3rd parameter
 * @return (void)
 */
function i3param($p1, int $p2, $p3 = true);

/**
 * A method with parameters passed by reference.
 *
 * The function statement presents the & reference char in
 * different places (bool & $p1 and &$p2).
 *
 * @param (string) $p1 the 1st parameter
 * @param (bool) $p2 the 2nd parameter
 *                   has a two-line comment
 * @return (string) the function result
 */
public function ipbyref(&$p1, bool & $p2);

/**
 * A method with a lot @info items.
 *
 * The function statement presents default values and casting.
 *
 * @param (int) $p1 the first parameter
 * @param (mixed) $p2 a text (string) as regular entry
 *                    or false (bool) to get a particualr behavior
 * @param (string) $p3 the third parameter
 *                  is commented onto
 *                  three lines
 * @param (array) $p4 a structured list:
 *                    'name' => the user name
 *                    'address' => the user address
 *                    'city' => the city name
 * @return (void) if echo flag $p1 is true,
 *                the comment continue on a three
 *                lines to test return values parsing
 *         (string) the printable result if echo flag is false (default)
 */
public function mlotinf($p1, string $p2="a string", $p3 = "another string", $p4);

}
?>
